package cn.sofwin.sb;

import cn.sofwin.sb.di.Computer;
import cn.sofwin.sb.entity.Order;
import cn.sofwin.sb.entity.User;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.util.Arrays;


public class XmlDemo {
    public static void main(String[] args) {
        ApplicationContext act = new ClassPathXmlApplicationContext("app.xml");

//        User zs = act.getBean(User.class);
//        System.out.println(zs);

//        Order order = act.getBean(Order.class);
//        System.out.println(order);

//        Computer computer = act.getBean(Computer.class);
//        System.out.println(computer);
        String[] names = act.getBeanDefinitionNames();
        Arrays.asList(names).forEach(System.out::println);
    }
}
